﻿using System;

namespace diantou.web.contest
{
    /// <summary>
    /// 比赛用户信息相关调用
    /// </summary>
    [fastCSharp.code.cSharp.webCall]
    class contestUser : fastCSharp.code.cSharp.webCall.call<contestUser>
    {
        /// <summary>
        /// 导出用户信息
        /// </summary>
        /// <param name="contestId"></param>
        [fastCSharp.code.cSharp.webCall]
        public void Export(int contestId)
        {
            diantou.dataAccess.user user = pub.GetSessionUser(this);
            if (user != null)
            {
                string users = diantou.dataAccess.tcpCall.contestUser.export(contestId, user.Id);
                if (users != null)
                {
                    createResponse();
                    try
                    {
                        Response.SetTextContentType();
                        response(users);
                    }
                    finally { responseEnd(); }
                    return;
                }
            }
            NotFound404();
        }
    }
}
